<?php
/**
 * 资产包尽调报告——1.立项信息（只读）
 * User: zhao shou qiang
 * Date: 2018/1/9 0009
 * Time: 09:11
 */

function set_number_format2($number)
{
    if ($number != '') {
        $str= 0;
        $number = str_replace(',','',$number);
        if (strrpos($number, '.')) {
            $strlen = strrpos($number, '.');
            $str1 = substr($number, $strlen);
            $str2 = number_format(substr($number, 0, $strlen));
            $str = $str2 . $str1;
        } else {
            if (is_numeric($number)) {
                $str = number_format($number);
            }
        }
        return $str;
    }
    return 0;
}

?>
<!--investigation_base_info_form-->
<!-- 1. 基本信息一栏-->
<form class="form-horizontal clearfix form-lxxx">
    <!-- 1 -->
    <div class="form-group clearfix">
        <label for="" class="pull-left control-label">资产包名称</label>
            <div class="pull-left label-div">
            <input type="text" class="form-control" value="<?PHP echo $data['title'] ?>" disabled="disabled">
        </div>
    </div>
    <!-- 3 -->
    <div class="form-group clearfix">
        <label for="" class="pull-left control-label">资产包类型</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control" value="<?PHP $package_type = Yii::$app->params['package_type'];
            echo $data['type'] ? $package_type[$data['type']] : ''; ?>" disabled="disabled">
        </div>
    </div>
    <!-- 4 -->
    <div class="form-group clearfix">
        <label for="inputText4" class="pull-left control-label ">持包人名称</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control" value="<?php echo $data['creditor'] ?>" disabled="disabled">
        </div>
    </div>
    <!-- 5 -->
    <div class="form-group clearfix">
        <label for="inputText5" class="pull-left control-label">省份地区</label>
        <div class="pull-left label-div">
            <?php if($data['city'] != ''){?>
                <input type="text" class="form-control" value="<?php echo $data['province'] . '&nbsp;&nbsp;' . $data['city']; ?>" disabled="disabled">
            <?php }else {?>
                <input type="text" class="form-control" value="<?php echo $data['province']; ?>" disabled="disabled">
            <?php } ?>
        </div>
    </div>
    <!-- 5 -->
    <!-- <div class="form-group clearfix">
      <label for="inputText5" class="pull-left control-label">币种</label>
      <div class="pull-left label-div">
            <input type="text" class="form-control" id="" value="人民币" disabled="disabled">
      </div>
  </div> -->
    <!-- 6 -->
    <div class="form-group clearfix">
        <label for="" class="pull-left control-label">本金（元）</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control" value="<?PHP echo set_number_format2($data['principal']); ?>" disabled="disabled">
        </div>
    </div>
    <!-- 7 -->
    <div class="form-group clearfix">
        <label for="" class="pull-left control-label">利息（元）</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control" value="<?PHP echo set_number_format2($data['interest']); ?>" disabled="disabled">
        </div>
    </div>
    <!-- 8 -->
    <div class="form-group clearfix">
        <label for="" class="pull-left control-label">剩余户数</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control" value="<?PHP echo $data['hushu'] ?>" disabled="disabled">
        </div>
    </div>
    <!-- 9 -->
    <div class="form-group clearfix">
        <label for="" class="pull-left control-label">未诉债权时效 </br>及催收方式</label>
        <div class="pull-left label-div">
            <!-- <input type="text" class="form-control" value="<?php echo $data['limit_collection'] ?>" disabled="disabled"> -->
            <pre><?php echo $data['limit_collection'] ?></pre>
        </div>
    </div>
    <div class="form-group clearfix">
        <label for="" class="pull-left control-label">资产包信息来源</label>
        <div class="pull-left label-div">
            <!-- <input type="text" class="form-control" value="<?PHP echo $data['origin']; ?>" disabled="disabled"> -->
            <pre><?PHP echo $data['origin']; ?></pre>
        </div>
    </div>
    <div class="form-group clearfix">
        <label for="" class="pull-left control-label">其他补充 </label>
        <div class="pull-left label-div label-div2">
            <!-- <textarea class="form-control" rows="" placeholder="<?PHP echo $data['detail'] ?>"
                      disabled="disabled"></textarea> -->
            <pre><?PHP echo $data['detail'] ?></pre>
        </div>
    </div>
    <!-- 以下数据系统自动计算，仅供参考 -->
    <div class="form-group clearfix mb20">
        <label for="" class="pull-left control-label c1 w100"> 以下数据系统自动计算，仅供参考</label>
    </div>
    <div class="clearfix details-list">
        <?php $allCalculate = $data['allCalculate']; ?>
        <!-- 1 -->
        <label for="" class="pull-left">抵押担保金额（元） </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalDY']) ? $allCalculate['principalDY'] : 0; ?>">

        <label for="" class="pull-left">抵押担保金额占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalDYB']) ? $allCalculate['principalDYB'] : 0; ?>">

        <label for="" class="pull-left">抵押户数 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countDY']) ? $allCalculate['countDY'] : 0; ?>">

        <label for="" class="pull-left">抵押户数占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled=""
               value="<?php echo isset($allCalculate['countDYB']) ? $allCalculate['countDYB'] : 0; ?>">

        <!-- 2 -->
        <label for="" class="pull-left">已诉本金（元） </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalYS']) ? $allCalculate['principalYS'] : 0; ?>">

        <label for="" class="pull-left">已诉本金占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalYSB']) ? $allCalculate['principalYSB'] : 0; ?>">

        <label for="" class="pull-left">已诉户数 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countYS']) ? $allCalculate['countYS'] : 0; ?>">

        <label for="" class="pull-left">已诉户数占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countYSB']) ? $allCalculate['countYSB'] : 0; ?>">

        <!-- 3 -->
        <label for="" class="pull-left">存续本金（元） </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalXC']) ? $allCalculate['principalXC'] : 0; ?>">

        <label for="" class="pull-left">存续本金占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalXCB']) ? $allCalculate['principalXCB'] : 0; ?>">

        <label for="" class="pull-left">存续户数 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countXC']) ? $allCalculate['countXC'] : 0; ?>">

        <label for="" class="pull-left">存续户数占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countXCB']) ? $allCalculate['countXCB'] : 0; ?>">

        <!-- 5 -->
        <label for="" class="pull-left">破产本金（元） </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalPC']) ? $allCalculate['principalPC'] : 0; ?>">

        <label for="" class="pull-left">破产本金占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalPCB']) ? $allCalculate['principalPCB'] : 0; ?>">

        <label for="" class="pull-left">破产户数 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countPC']) ? $allCalculate['countPC'] : 0; ?>">

        <label for="" class="pull-left">破产户数占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countPCB']) ? $allCalculate['countPCB'] : 0; ?>">

        <!-- 6 -->
        <label for="" class="pull-left">亮点项目本金（元） </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalLD']) ? $allCalculate['principalLD'] : 0; ?>">

        <label for="" class="pull-left">亮点项目本金占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['principalLDB']) ? $allCalculate['principalLDB'] : 0; ?>">

        <label for="" class="pull-left">亮点户数 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countLD']) ? $allCalculate['countLD'] : 0; ?>">

        <label for="" class="pull-left">亮点户数占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countLDB']) ? $allCalculate['countLDB'] : 0; ?>">

        <!-- 7 -->
        <label for="" class="pull-left c1">折扣率 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['zkl']) ? $allCalculate['zkl'] : '--'; ?>">

        <label for="" class="pull-left c1">预估投资回报率 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['evaluationHBB']) ? $allCalculate['evaluationHBB'] : '--'; ?>">

        <label for="" class="pull-left">国有企业户数 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countGQ']) ? $allCalculate['countGQ'] : 0; ?>">

        <label for="" class="pull-left">国有企业户数占比 </label>
        <input type="text" name="" id="" class="pull-left" disabled
               value="<?php echo isset($allCalculate['countGQB']) ? $allCalculate['countGQB'] : 0; ?>">
    </div>
</form>
